package com.itheima.mapper;

import com.itheima.pojo.OrderSetting;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

public interface OrderSettingMapper {
    void importOrderSettings(OrderSetting orderSetting);

    int findOrderSettingByOrderDate(@Param("orderDate") Date orderDate);

    void updateOrderSettingByOrderDate(OrderSetting orderSetting);
    @Select("select * from t_ordersetting where orderdate between #{beginDate} and #{endDate}")
    List<OrderSetting> findOrderSettingByDate(@Param("beginDate") String beginDate, @Param("endDate") String endDate);

    @Update("update t_ordersetting set number = #{num} where orderdate=#{dateparam}")
    void updateOrderSettingData(@Param("dateparam") String dateparam, @Param("num") int num);

    Long findIsAvalibleByDate(@Param("dateparam") String dateparam);

    void updateResersionsByDate(@Param("dateparam") String dateparam);

}
